package com.eastfair.gateway;

import com.eastfair.log.LampMdcAdapterInitializer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

import static com.eastfair.constant.BizConstant.UTIL_PACKAGE;

/**
 * 网关
 * @Author ligang
 * @Date 2020/3/16 15:02
 */
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
@ComponentScan({
        UTIL_PACKAGE
})
@Configuration
public class GatewayApplication {

    public static void main(String[] args) {
//        SpringApplication.run(GatewayApplication.class, args);
        SpringApplication application = new SpringApplication(GatewayApplication.class);
        application.addInitializers(new LampMdcAdapterInitializer());
        application.run(args);
    }

}
